package com.ruoyi.pharmacy.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 药房操作记录对象 pharmacy_operate
 *
 * @author ruoyi
 * @date 2025-08-22
 */
public class PharmacyOperate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 药房操作id */
    private Integer operateId;

    /** 药房ID */
    @Excel(name = "药房ID")
    private Integer pharmacyId;

    /** 药品ID */
    @Excel(name = "药品ID")
    private Integer drugId;
    /** 操作类型（1=接收调拨，2=患者取药） */
    @Excel(name = "操作类型", readConverterExp = "1==接收调拨，2=患者取药")
    private Integer operateType;

    /** 操作数量（接收为正，取药为负） */
    @Excel(name = "操作数量", readConverterExp = "接=收为正，取药为负")
    private Integer quantity;

    /** 关联ID（如调拨单ID、取药单ID） */
    @Excel(name = "关联ID", readConverterExp = "如=调拨单ID、取药单ID")
    private Integer relatedId;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date operateTime;

    public Integer getOperateId() {
        return operateId;
    }

    public void setOperateId(Integer operateId) {
        this.operateId = operateId;
    }

    public Integer getPharmacyId() {
        return pharmacyId;
    }

    public void setPharmacyId(Integer pharmacyId) {
        this.pharmacyId = pharmacyId;
    }

    public Integer getDrugId() {
        return drugId;
    }

    public void setDrugId(Integer drugId) {
        this.drugId = drugId;
    }

    public Integer getOperateType() {
        return operateType;
    }

    public void setOperateType(Integer operateType) {
        this.operateType = operateType;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getRelatedId() {
        return relatedId;
    }

    public void setRelatedId(Integer relatedId) {
        this.relatedId = relatedId;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("operateId", getOperateId())
            .append("pharmacyId", getPharmacyId())
            .append("drugId", getDrugId())
            .append("operateType", getOperateType())
            .append("quantity", getQuantity())
            .append("relatedId", getRelatedId())
            .append("operateTime", getOperateTime())
            .append("remark", getRemark())
            .toString();
    }
}
